<?php
ini_set('display_errors',1);
set_time_limit(0);
include_once  dirname(dirname(dirname(__FILE__))).'/mgtv_v2/mgtv_init.php';
define('ORG_ID', 'sihua_huawei');
include_once dirname(dirname(dirname(__FILE__))) . '/mgtv_v2/'.ORG_ID.'/init.php';
include_once  dirname(dirname(dirname(__FILE__))).'/mgtv_v2/'.ORG_ID.'/define.php';
define('CSPID','hntv');
define('LSPID','hntv');
class sihua_huawei_client{
	const WSDL = 'http://127.0.0.1/nn_cms_mgtvbk/mgtv/sihua_huawei/sihua_huawei_service.php?wsdl';
	static public function ExecCmd($CorrelateID,$CmdFileURL){
		
		$arg_list = func_get_args();
		i_write_log_core('ExecCmd request args:'.var_export($arg_list,true),ORG_ID.'/c21');
		$client = self::get_soap_client();
		//print_r($client);
		//die;
		$ret = $client->ExecCmd(CSPID,LSPID,$CorrelateID,$CmdFileURL);
		i_write_log_core('ExecCmd return:'.var_export($ret,true),ORG_ID.'/c21');
		i_write_log_core('ExecCmd return:'.json_encode($ret),ORG_ID.'/c2json1');
		var_dump($ret);die;
		//print_r(json_encode($ret));
		return $ret;
	}
	public static function get_soap_client(){
		return new SOAPClient(self::WSDL,array('trace'=>true));
	}
}
